package infraestructura;

public class UserDAO {

    public static UserPersistence getDAO(String persistenceMechanism) {
        if (persistenceMechanism.equals("memory")) {
            return UserMemoryPersistence.getPersistenceManager();
        } else if ("db".equals(persistenceMechanism)) {
            return UserPoolPersistence.getPersistenceManager();
        } else {
            return null;
        }
    }
}
